package com.zl.quickdoc.model;

import java.util.LinkedHashMap;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * @author zhouliang
 */
public class DocCfgParam {
    
    /**
     * 拆分接口数量，一般可以不填
     */
    @JsonIgnore
    private Integer num;
    /**
     * 版本号
     */
    private String version="1.0.0";
    
    /**
     * 变更说明，\n分隔
     */
    private Map<String,String> changeHis=new LinkedHashMap<>();
    
    /**
     * 项目标题
     */
    private String projectTitle = "接口文档";
    
    /**
     * 二级标题
     */
    private String title="（测试环境）";
    
    /**
     * 域名
     */
    private String serverIp="http://127.0.0.1:8080";
    
    /**
     * 代理前缀
     */
    private String proxyPrefix;
    
    /**
     * 文档输出路径
     */
    @JsonIgnore
    private String apiPath;
    /**
     * 字段是否排序
     */
    @JsonIgnore
    private boolean orderFlag=false;
    /**
     * API是否排序
     */
    @JsonIgnore
    private boolean apiOrderFlag=false;
    
    /**
     * 要生成的接口包路径，逗号分隔
     */
    @JsonIgnore
    private String includePackages;
    /**
     * 要排除的接口包路径，逗号分隔
     */
    @JsonIgnore
    private String excludePackages;
    /**
     * 源码文件目录，逗号分隔
     */
    @JsonIgnore
    private String javaPath;
    
    @JsonIgnore
    private String classPath;
    
    /**
     * 开启类型转换规则
     */
    @JsonIgnore
    private boolean typeConvertFlag=false;
    
    /**
     * 类型转换规则
     */
    @JsonIgnore
    private Map<String,String> typeConvertMap=new LinkedHashMap<>();
    
    /**
     * 额外的参数，为了扩展模板属性
     */
    @JsonIgnore
    private Map<String,Object> properties=new LinkedHashMap<>();
    
    /**
     * 自定义模板路径
     */
    @JsonIgnore
    private String templatePath;
    
    /**
     * 版本记录
     */
    @JsonIgnore
    private boolean versionFlag=false;
    
    /**
     * 模块分组
     */
    @JsonIgnore
    private boolean moduleGroupFlag=false;
    
    /**
     * 是否自动打开文档
     */
    @JsonIgnore
    private boolean autoOpenFlag=true;
    

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public Map<String,String> getChangeHis() {
        return changeHis;
    }

    public void setChangeHis(Map<String,String> changeHis) {
        if(changeHis == null) {
            changeHis = new LinkedHashMap<>();
        }
        this.changeHis = changeHis;
    }

    public String getProjectTitle() {
        return projectTitle;
    }

    public void setProjectTitle(String projectTitle) {
        this.projectTitle = projectTitle;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getServerIp() {
        return serverIp;
    }

    public void setServerIp(String serverIp) {
        this.serverIp = serverIp;
    }

    public String getApiPath() {
        return apiPath;
    }

    public void setApiPath(String apiPath) {
        this.apiPath = apiPath;
    }

    public boolean getOrderFlag() {
        return orderFlag;
    }

    public void setOrderFlag(boolean orderFlag) {
        this.orderFlag = orderFlag;
    }

    public boolean getApiOrderFlag() {
		return apiOrderFlag;
	}

	public void setApiOrderFlag(boolean apiOrderFlag) {
		this.apiOrderFlag = apiOrderFlag;
	}

	public String getIncludePackages() {
        return includePackages;
    }

    public void setIncludePackages(String includePackages) {
        this.includePackages = includePackages;
    }

    public String getExcludePackages() {
        return excludePackages;
    }

    public void setExcludePackages(String excludePackages) {
        this.excludePackages = excludePackages;
    }

    public String getJavaPath() {
        return javaPath;
    }

    public void setJavaPath(String javaPath) {
        this.javaPath = javaPath;
    }

    public String getClassPath() {
        return classPath;
    }

    public void setClassPath(String classPath) {
        this.classPath = classPath;
    }

    public boolean getTypeConvertFlag() {
        return typeConvertFlag;
    }

    public void setTypeConvertFlag(boolean typeConvertFlag) {
        this.typeConvertFlag = typeConvertFlag;
    }

    public Map<String, String> getTypeConvertMap() {
        return typeConvertMap;
    }

    public void setTypeConvertMap(Map<String, String> typeConvertMap) {
        if(typeConvertMap == null) {
            typeConvertMap = new LinkedHashMap<>();
        }
        this.typeConvertMap = typeConvertMap;
    }

    public Map<String, Object> getProperties() {
        return properties;
    }

    public void setProperties(Map<String, Object> properties) {
        if(properties == null) {
            properties = new LinkedHashMap<>();
        }
        this.properties = properties;
    }

    public String getTemplatePath() {
        return templatePath;
    }

    public void setTemplatePath(String templatePath) {
        this.templatePath = templatePath;
    }

    public boolean getVersionFlag() {
        return versionFlag;
    }

    public void setVersionFlag(boolean versionFlag) {
        this.versionFlag = versionFlag;
    }

	public boolean getModuleGroupFlag() {
		return moduleGroupFlag;
	}

	public void setModuleGroupFlag(boolean moduleGroupFlag) {
		this.moduleGroupFlag = moduleGroupFlag;
	}

    public String getProxyPrefix() {
        return proxyPrefix;
    }

    public void setProxyPrefix(String proxyPrefix) {
        this.proxyPrefix = proxyPrefix;
    }

    public boolean getAutoOpenFlag() {
        return autoOpenFlag;
    }

    public void setAutoOpenFlag(boolean autoOpenFlag) {
        this.autoOpenFlag = autoOpenFlag;
    }
}
